************************************************************************************************
************************************************************************************************
* PAPER: Unspoken Hierarchies: The Enduring Effects of Caste Discrimination in Africa
* AUTHORS: Leonardo Arriola, Dominika Koter, Martha Wilfahrt
* JOURNAL: Perspectives on Politics
************************************************************************************************
************************************************************************************************

cd "/Users/marthawilfahrt/Dropbox/Caste in Senegal/Writing/Citizenship Paper/Submissions/Perspectives/Final Submission/AKW_Replication Data"

use "Caste_Final.dta", clear

encode Department, gen(Dept)

label var SES "SES"
label var Age "Age"
label var Enqueteur_Casted "Casted Enumerator"
label var Casted_Only "Casted"
label var Noble "Noble"
label var SHO "Social Hierarchy"
label var Casted "Casted/Slave"
label var Accept_Caste_Friends "Accept Friends"
label var Religiosity "Religiosity"
label var Mandinka "Mande"
label var Peul "Peul"
label var SocialNetwork_Caste2 "Network Heterogeneity"
label var Freq_Interactions "Freq Interactions Index"
label var IntercasteMarriage_Index "Intermarriage Index"
label var Cross_Caste_Comfort "Cross-Caste Comfort"
label var Seperate_Bio "Biological Basis"
label var Seperate_EconComp "Econ Competition"
label var Seperate_Religion "Religious Instruction"
label var Seperate_Culture "Cultural Basis"
label var Respect_Differences2 "Respect Caste Norms"
label var Unfair_Caste "Unfair Treatment"
label var LastName_Insult "Name-based Insult"
label var Denied_Any "Denied Service/Right"
label var Accept_Index "Acceptance Index"
label var Advice_BreakUp "Advise No Marriage"
label var Bias_Index "Perceptions of Bias"
label var Gov_Act_Jobs "Gov Should Help Job"
label var Gov_Act_Housing "Gov Should Help Housing"
label var Gov_Act_Burial "Gov Should Help Burial"
label var Gov_Act_Mosque "Gov Should Help Mosque"
label var Gov_Help_Jobs "Gov Would Help Job"
label var Gov_Help_Housing "Gov Would Help Housing"
label var Gov_Help_Burial "Gov Would Help Burial"
label var Gov_Help_Mosque "Gov Would Help Mosque"
label var Religiosity "Religiosity"
label var Youth "Under 40"
label var Enum_Same_Caste "Enumerator Same Caste"
label var Enum_Diff_Caste "Enumerator Opposite Caste"


************************************************************************************************
* 4. SUMMARY STATISTICS
************************************************************************************************
{
* Table 4.1: Summary Statistics of Variables in Main Text
eststo Full_Sample: quietly estpost summarize ///
     Noble Peasant Casted_Only Slave SES Religiosity Education Urban Female Age Peul Enqueteur_Casted SocialNetwork_Caste2 Freq_Interactions IntercasteMarriage_Index Cross_Caste_Comfort SHO   Respect_Differences2 Seperate_Bio Seperate_EconComp Seperate_Religion Seperate_Culture Unfair_Caste LastName_Insult Denied_Any Accept_Index Advice_BreakUp Bias_Index   Gov_Act_Jobs Gov_Act_Housing Gov_Act_Burial Gov_Act_Mosque Gov_Help_Jobs Gov_Help_Housing Gov_Help_Burial Gov_Help_Mosque
eststo Casted_Sample: quietly estpost summarize ///
     Slave SES Religiosity  Education Urban Female Age Peul Enqueteur_Casted SocialNetwork_Caste2 Freq_Interactions IntercasteMarriage_Index Cross_Caste_Comfort SHO   Respect_Differences2 Seperate_Bio Seperate_EconComp Seperate_Religion Seperate_Culture Unfair_Caste LastName_Insult Denied_Any Accept_Index Advice_BreakUp Bias_Index    Gov_Act_Jobs Gov_Act_Housing Gov_Act_Burial Gov_Act_Mosque Gov_Help_Jobs Gov_Help_Housing Gov_Help_Burial Gov_Help_Mosque if Casted == 1
eststo Noncasted_Sample: quietly estpost summarize ///
    Noble Peasant SES Religiosity  Education Urban Female Age Peul Enqueteur_Casted SocialNetwork_Caste2 Freq_Interactions IntercasteMarriage_Index Cross_Caste_Comfort SHO   Respect_Differences2 Seperate_Bio Seperate_EconComp Seperate_Religion Seperate_Culture Unfair_Caste LastName_Insult Denied_Any Accept_Index Advice_BreakUp Bias_Index    Gov_Act_Jobs Gov_Act_Housing Gov_Act_Burial Gov_Act_Mosque Gov_Help_Jobs Gov_Help_Housing Gov_Help_Burial Gov_Help_Mosque if Casted == 0
esttab Full_Sample Noncasted_Sample Casted_Sample using "Tables Output/SumStats_Appendix.tex", longtable replace ///
	cells("mean (fmt(2)) sd (fmt(2)) min (fmt(2)) max (fmt(2))") ///
	label title("Summary Statistics of Variables in Main Text"\label{SumStats}) nonumbers wide mtitles("Full Sample" "Noble/Peasant" "Casted/Slave") 
}

************************************************************************************************
* 5. DEMOGRAPHIC VARIABLES
************************************************************************************************
{
* Table 5.1: Base Demographic Models
reg SES  Noble Casted_Only Slave Religiosity Education Urban Female Age Peul i.Dept  , cluster(EA_Name2) robust
eststo SES2
 estadd local  FE  "Yes"
reg WaterQuality   Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul i.Dept  , cluster(EA_Name2) robust
eststo Water2
 estadd local  FE  "Yes"
reg Education   Noble Casted_Only Slave  SES Religiosity Urban Female Age Peul  i.Dept  , cluster(EA_Name2) robust
eststo Education2
 estadd local  FE  "Yes"
reg Religiosity   Noble Casted_Only Slave  SES Education Urban Female Age Peul i.Dept  , cluster(EA_Name2) robust
eststo Religiosity2
 estadd local  FE  "Yes"

esttab SES2  Water2 Education2 Religiosity2 using "Tables Output/Demographics1.tex", replace ///
	scalars(r2 "FE EA Fixed Effects")  se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  _cons) ///
	order(Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  _cons) ///
	label title("Base Demographic Models"\label{Demographics1})  ///
	mtitles("SES" "Water Quality" "Education" "Religiosity") addnote(Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
************************************************************************************************
* 6. RANDOM ASSIGNMENT OF ENUMERATORS
************************************************************************************************
{
*Table 6.1: Di!erence of Means by Enumerator Caste 
local vars Casted Urban Education Age Female SES
estpost ttest `vars', by(Enqueteur_Casted)

esttab . using  "Tables Output/EnumeratorCaste_TTest_Appendix.tex", longtable replace ///
	cells("mu_1 mu_2 p") ///
	label title("Difference of Means by Enumerator Caste"\label{EnumCaste}) nonumbers wide mtitles("Not Casted" "Casted" "P-Value") 
}

************************************************************************************************
* 7. CASTE DISCRIMINATION IS A SOCIAL REALITY
************************************************************************************************
{
* Table 7.1 Full Model Results for Table 1
{
reg Unfair_Caste  Noble Casted_Only Slave    , cluster(EA_Name2) robust
eststo Unfair_Caste
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg Unfair_Caste  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Unfair_Caste2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  LastName_Insult  Noble Casted_Only Slave  , cluster(EA_Name2) robust or
eststo LastName_Insult
 estadd local  FE  "Yes"
 estadd local  DC  "No"
logit  LastName_Insult  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo LastName_Insult2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  Denied_Any Noble Casted_Only Slave   , cluster(EA_Name2) robust or
eststo Denied_Any
 estadd local  FE  "Yes"
 estadd local  DC  "No"
logit  Denied_Any Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Denied_Any2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

esttab Unfair_Caste Unfair_Caste2 LastName_Insult LastName_Insult2 Denied_Any Denied_Any2   using "Tables Output/Discrimination_Full.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  modelwidth(2) keep(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Caste Identity Affects the Likelihood of Discrimination"\label{Discrimination}) compress eform(0 0 1 1 1 1) ///
	mtitles("Unfair Treatment" "Name-based Insult" "Denied Service/Right") addnote(Models 3-6 report odds ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
 	
* TABLE 7.2: Caste Identity Conditions Comparative Discrimination
{
reg Unfair_Ethnic  Noble Casted_Only Slave   , cluster(EA_Name2) robust
	eststo Unfair_Ethnic
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_Ethnic  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Unfair_Ethnic2
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_Religion  Noble Casted_Only Slave   , cluster(EA_Name2) robust
	eststo Unfair_Religion
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_Religion  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Unfair_Religion2
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_Confrerie  Noble Casted_Only Slave   , cluster(EA_Name2) robust
	eststo Unfair_Confrerie	
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_Confrerie  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Unfair_Confrerie2
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_EconConds  Noble Casted_Only Slave  , cluster(EA_Name2) robust
	eststo Unfair_EconConds
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_EconConds  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Unfair_EconConds2
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_Education  Noble Casted_Only Slave  , cluster(EA_Name2) robust
	eststo Unfair_Education
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
reg Unfair_Education  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Unfair_Education2
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"

esttab Unfair_Ethnic Unfair_Ethnic2 Unfair_Religion Unfair_Religion2 Unfair_Confrerie Unfair_Confrerie2 Unfair_EconConds Unfair_EconConds2 Unfair_Education Unfair_Education2 using "Tables Output/Discr_Comp.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  modelwidth(2) keep(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Caste Identity Conditions Comparative Discrimination"\label{ComparativeDiscr}) compress ///
	mtitles("Ethnicity" "Religion" "Islamic Brotherhood" "Economic Conditions" "Education" ) addnote(Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
* Table 7.3: Caste Identity Affects the Likelihood of Discrimination (Table 2) - Casted versus Non-Casted Respondents
{
reg Unfair_Caste  Noble SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Casted == 0, cluster(EA_Name2) robust
eststo Unfair_Caste_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 reg Unfair_Caste    Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Casted == 1, cluster(EA_Name2) robust
eststo Unfair_Caste_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  LastName_Insult  Noble SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust or
eststo LastName_Insult_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 logit  LastName_Insult    Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust or
eststo LastName_Insult_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  Denied_Any Noble SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust or
eststo Denied_Any_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  Denied_Any   Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust or
eststo Denied_Any_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

esttab Unfair_Caste_NC Unfair_Caste_C LastName_Insult_NC LastName_Insult_C Denied_Any_NC Denied_Any_C using "Tables Output/DiscriminationNC_v_C.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  modelwidth(2) keep( Noble Casted_Only Slave Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave  Enqueteur_Casted _cons) ///
	label title("Caste Identity Affects the Likelihood of Discrimination - Casted versus Non-Casted Respondents"\label{Discrimination_C_NC}) compress eform(0 0 1 1 1 1) ///
	mtitles("Unfair Treatment" "Name-based Insult" "Denied Service/Right") addnote(Models 3-6 report odds ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
* Table 7.4: Institutional discrimination (Odds Ratios): Has been denied ...
{
logit Denied_Inst  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Denied_Inst
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedTransport_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Transport_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedJob_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo CasteBias_DeniedJob_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedHousing_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo DeniedHousing_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedEduc_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo CasteBias_DeniedEduc_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedGovService_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo GovService_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"

esttab Denied_Inst Transport_Dummy CasteBias_DeniedJob_Dummy DeniedHousing_Dummy CasteBias_DeniedEduc_Dummy GovService_Dummy using "Tables Output/Denied_Inst.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  modelwidth(2) keep(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Institutional discrimination (Odds Ratios): Has been denied ..."\label{ComparativeDiscr}) compress ///
	mtitles("Any Inst" "Transport" "Jobs" "Housing" "Education" "Gov Service") addnote(Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
* Table 7.5: Social discrimination (Odds Ratios): Has been denied ...
{
logit Denied_Social  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Denied_Social
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedFriendship_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Friendship_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedMarriage_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Marriage_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedSocial_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Social_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"
logit CasteBias_DeniedCommMtg_Dummy  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo CommMtg_Dummy
		estadd local  FE  "Yes"
		estadd local  DC  "Yes"

esttab Denied_Social Friendship_Dummy Marriage_Dummy Social_Dummy CommMtg_Dummy  using "Tables Output/Denied_Social.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  modelwidth(2) keep(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Social discrimination (Odds Ratios): Has been denied ..."\label{ComparativeDiscr}) compress ///
	mtitles("Any Social" "Friendship" "Marriage" "Social Event" "Comm Mtg") addnote(Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
}

************************************************************************************************
* 8. CULTURAL NORMS SUSTAIN CASTE DISCRIMINATION
************************************************************************************************
{
* Table 8.1: What Explains Differences Between Castes?
gen Reason_CasteSeperation2_2 = Reason_CasteSeperation2
replace Reason_CasteSeperation2_2 = "" if Reason_CasteSeperation2_2 == "Ignorance" | Reason_CasteSeperation2_2 == "They have not historically been kept apart"
encode Reason_CasteSeperation2_2, gen(Reason_CasteSeperation3)

mlogit Reason_CasteSeperation3  ib2.Caste_Grp2 , cluster(EA_Name2) robust 
eststo Seperate_Reason
mlogit Reason_CasteSeperation3 ib2.Caste_Grp2 SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted , cluster(EA_Name2) robust 
eststo Seperate_Reason2

esttab Seperate_Reason Seperate_Reason2 using "Tables Output/ReasonsCaste.csv", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(*.Caste_Grp2 _cons) ///
	label title("Attitudes About Cultural Basis of Caste"\label{ReasonsCaste}) compress unstack noomitted  ///
	mtitles("Biological Basis" "Econ Competition" "Religion") addnote(Relative Risks Ratios from  multinomial logit, with 'Cultural Practices' as the omittPed baseline category. Base Social Group = Peasants. Robust standard errors clustered by enumeration area.)

	
* Table 8.2: Do Respondents Who Invoke Biological Differences Hold More Discriminatory Attitudes?
{
logit  Respect_Differences2  Noble Casted_Only Slave Seperate_Bio SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Respect_Differences
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 
reg  Cross_Caste_Comfort  Noble Casted_Only Slave Seperate_Bio SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Cross_Caste_Comfort
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Accept_Index SHO Noble Casted_Only Slave Seperate_Bio SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Accept_Index
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

logit  Advice_BreakUp SHO Noble Casted_Only Slave Seperate_Bio SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Advice_BreakUp
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index  Noble Casted_Only Slave Seperate_Bio SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo IntercasteMarriage
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

  
esttab Respect_Differences Cross_Caste_Comfort Accept_Index Advice_BreakUp  IntercasteMarriage  using "Tables Output/Resp_BiologicalDiff.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave Seperate_Bio Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave Seperate_Bio Enqueteur_Casted _cons) ///
	label title("Do Respondents Who Invoke Biological Differences Hold Less Discriminatory Attitudes?"\label{Generational})  compress eform (1 0 0 1 0) ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index" "Advise Child No Marriage" "Network Intermarriage Index") addnote(Results of OLS regressions with exception of models 1 and 4, whcih report results from logit. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.3: Comfort with Cross-Caste Relations (Table 3 Full Results)
{
logit  Respect_Differences2  Noble Casted_Only Slave  , cluster(EA_Name2) robust or
eststo Respect_Differences
 estadd local  FE  "No"
 estadd local  DC  "Yes"
logit  Respect_Differences2  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Respect_Differences2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Cross_Caste_Comfort  Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Cross_Caste_Comfort
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Cross_Caste_Comfort  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Cross_Caste_Comfort2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Accept_Index  Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Accept_Index
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Accept_Index SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Accept_Index2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 
esttab Respect_Differences Respect_Differences2 Cross_Caste_Comfort Cross_Caste_Comfort2 Accept_Index Accept_Index2 using "Tables Output/HigherStatus_Full.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Higher Status Groups Are Less Comfortable with Cross-Caste Relations"\label{HigherStatus_Full})  compress eform(1 1 0 0 0 0) ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index") addnote(Models 1-2 reports Odds Ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.4: Comfort with Cross-Caste Relations -Casted versus Non-Casted Respondents
{
logit  Respect_Differences2  Noble  SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Casted == 0, cluster(EA_Name2) robust or
eststo Respect_Differences_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  Respect_Differences2  Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust or
eststo Respect_Differences_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Cross_Caste_Comfort  Noble  SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust
eststo Cross_Caste_Comfort_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Cross_Caste_Comfort Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust
eststo Cross_Caste_Comfort_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Accept_Index SHO Noble  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust
eststo Accept_Index_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Accept_Index SHO Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust
eststo Accept_Index_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 
esttab Respect_Differences_NC Respect_Differences_C Cross_Caste_Comfort_NC Cross_Caste_Comfort_C Accept_Index_NC Accept_Index_C using "Tables Output/Table5_HigherStatus_NC_v_C.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Slave Enqueteur_Casted _cons) ///
	order(Noble Slave Enqueteur_Casted _cons) ///
	label title("Higher Status Groups Are Less Comfortable with Cross-Caste Relations - Casted versus Non-Casted Respondents"\label{HigherStatus_Full})  compress eform(1 1 0 0 0 0) ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index") addnote(Models 1-2 reports Odds Ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

* Table 8.5: Subcomponents of Cross-Caste Acceptance Index
{
reg  Accept_Caste_Work SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Caste_Work2
		estadd local  FE  "Yes"
reg  Accept_Caste_Neighbors SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Caste_Neighbors2
		estadd local  FE  "Yes"
reg  Accept_Caste_Friends SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Caste_Friends2
		estadd local  FE  "Yes"
reg  Accept_Caste_Marry SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Caste_Marry2
		estadd local  FE  "Yes"

esttab  Accept_Caste_Work2  Accept_Caste_Neighbors2  Accept_Caste_Friends2  Accept_Caste_Marry2 using "Tables Output/DiscriminationAccept_Appendix.tex", replace ///
		scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Subcomponents of Cross-Caste Acceptance Index"\label{DiscriminationAccept_Appendix}) ///
	mtitles("Accept Work Together" "Accept Neighbors" "Accept Friends" "Accept Marry" ) addnote(Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.6: Cross-Ethnic Acceptance Models
{
reg  Accept_Ethnic_Work Noble Casted_Only Slave SES SHO Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Ethnic_Work2
		estadd local  FE  "Yes"
reg  Accept_Ethnic_Neighbors Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Ethnic_Neighbors2
		estadd local  FE  "Yes"
reg  Accept_Ethnic_Friends Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Ethnic_Friends2
		estadd local  FE  "Yes"
reg  Accept_Ethnic_Marry Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Ethnic_Marry2
		estadd local  FE  "Yes"

esttab  Accept_Ethnic_Work2  Accept_Ethnic_Neighbors2  Accept_Ethnic_Friends2  Accept_Ethnic_Marry2 using "Tables Output/Discrimination_Comparison_Ethnic.tex", replace ///
		scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Cross-Ethnic Acceptance Models"\label{Discrimination2})  compress ///
	mtitles("Accept Work Together" "Accept Neighbors" "Accept Friends" "Accept Marry") addnote(Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.7: Cross-Religion Acceptance Models
{
reg  Accept_Religion_Work Noble Casted_Only Slave SES SHO Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Religion_Work
		estadd local  FE  "Yes"
reg  Accept_Religion_Neighbors Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Religion_Neighbors
		estadd local  FE  "Yes"
reg  Accept_Religion_Friends Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Religion_Friends
		estadd local  FE  "Yes"
reg  Accept_Religion_Marry Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Accept_Religion_Marry
		estadd local  FE  "Yes"

esttab  Accept_Religion_Work  Accept_Religion_Neighbors  Accept_Religion_Friends  Accept_Religion_Marry using "Tables Output/Discrimination_Comparison_Religion.tex", replace ///
		scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Cross-Religious Acceptance Models"\label{Discrimination2})  compress ///
	mtitles("Accept Work Together" "Accept Neighbors" "Accept Friends" "Accept Marry") addnote(Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.8: Higher Status Groups Enforce Marriage Restrictions (Table 4 Full Results)
{
logit  Advice_BreakUp  Noble Casted_Only Slave  , cluster(EA_Name2) robust or
eststo Advice_BreakUp
 estadd local  FE  "Yes"
 estadd local  DC  "No"
logit  Advice_BreakUp SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Advice_BreakUp2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index  Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo IntercasteMarriage_Index
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  IntercasteMarriage_Index  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo IntercasteMarriage_Index2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

 
esttab Advice_BreakUp Advice_BreakUp2 IntercasteMarriage_Index IntercasteMarriage_Index2  using "Tables Output/Table5_HigherStatus_marriage_Full.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  keep( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Higher Status Groups Enforce Marriage Restrictions (Table 5)"\label{highercastemarriage_Full})  compress eform(1 1 0 0) ///
	mtitles( "Advise Child No Marriage" "Network Intermarriage Index") addnote(Models 1-2 reports Odds Ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.9: Higher Status Groups Enforce Marriage Restrictions Casted versus Non-Casted Respondents
{
logit  Advice_BreakUp SHO Noble    SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Casted == 0, cluster(EA_Name2) robust or
eststo Advice_BreakUp_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  Advice_BreakUp SHO   Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust or
eststo Advice_BreakUp_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index  Noble   SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust
eststo IntercasteMarriage_Index_NC
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index    Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust
eststo IntercasteMarriage_Index_C
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

esttab Advice_BreakUp_NC Advice_BreakUp_C IntercasteMarriage_Index_NC IntercasteMarriage_Index_C  using "Tables Output/Table5_HigherStatus_marriage_C_NC.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  keep( Noble  Slave Enqueteur_Casted _cons) ///
	order( Noble  Slave Enqueteur_Casted _cons) ///
	label title("Higher Status Groups Enforce Marriage Restrictions (Table 5)"\label{highercastemarriage_C_NC})  compress eform(1 1 0 0) ///
	mtitles( "Advise Child No Marriage" "Network Intermarriage Index") addnote(Models 1-2 reports Odds Ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.10: Frequency of Cross-Caste Marriages in Social Network (Odds Ratios)
{
logit  IntercasteMarriage_Family  Noble Casted_Only Slave SHO   SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	eststo Marr_Fam2
		estadd local  FE  "Yes"
logit  IntercasteMarriage_ExtFamily  Noble Casted_Only Slave  SHO  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
		estadd local  FE  "Yes"
	eststo Marr_ExtFam2
logit  IntercasteMarriage_Friends  Noble Casted_Only Slave  SHO  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	eststo Marr_Friends2
		estadd local  FE  "Yes"
logit  IntercasteMarriage_Neighborhood  Noble Casted_Only Slave SHO   SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	eststo Marr_Neighborhood2
		estadd local  FE  "Yes"

esttab Marr_Fam2 Marr_ExtFam2 Marr_Friends2 Marr_Neighborhood2 using "Tables Output/Marriages_Appendix.tex", replace ///
	scalars(r2 "FE EA Fixed Effects")  b(3) se star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave   SES Religiosity  SHO  Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order( Noble Casted_Only Slave  SHO  SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Freqency of Cross-Caste Marriages in Social Network"\label{Marriages_Appendix}) compress eform ///
	mtitles("Immediate Family" "Extended Family" "Friends" "Neighbors") addnote(Models report odds Ratios. Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
*Table 8.11: Cross-Caste Social Interactions
{
reg SocialNetwork_Caste2  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Network2
		estadd local  FE  "Yes"
 reg Freq_Interactions  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Freq_Interactions2
		estadd local  FE  "Yes"
reg Interact_Visit  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Visit2
		estadd local  FE  "Yes"
reg Interact_Eat  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Eat2
		estadd local  FE  "Yes"
reg Interact_Festivals  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Festivals2
		estadd local  FE  "Yes"
reg Interact_ReligiousEvents  Noble Casted_Only Slave SHO SES Religiosity  Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo ReligEvents2
		estadd local  FE  "Yes"
reg Interact_ChildrenPlay  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo KidsPlay2
	
esttab  Network2 Freq_Interactions2 Visit2  Eat2  Festivals2  ReligEvents2  KidsPlay2   using "Tables Output/Interactions_Appendix.tex", replace ///
	scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave SES SHO  Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Cross-Caste Social Interactions"\label{Interactions_Appendix})  compress ///
	mtitles("Network Heterogeneity" "Freq Interactions Index" "Freq Visit" "Freq Eat Together" "Freq Attend Festivals" "Freq Religious Events" "Freq Kids Play") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
		
*Table 8.12: Frequency of Out-Group Marriages in Family (Odds Ratios)
{
logit ParentsDiffCaste  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	eststo ParentsDiffCaste2
		estadd local  FE  "Yes"
logit ParentsDiffEthnicity2  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	eststo ParentsDiffEthnicity2_2
		estadd local  FE  "Yes"
logit Wives_DiffCaste  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	eststo Wives_DiffCaste2
			estadd local  FE  "Yes"

esttab Wives_DiffCaste2 ParentsDiffCaste2 ParentsDiffEthnicity2_2 using "Tables Output/Family_Intermarriage.tex", replace ///
	scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave SES Religiosity SHO  Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order( Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Frequency of Out-Group Marriages in Family"\label{Family_Intermarriage})  compress eform ///
	mtitles("(Co)Wives Different Caste" "Parents Different Caste" "Parents Different Ethnicity") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
*Table 8.13: Table 2 Replication with Enumerator of Opposite Caste
{
reg Unfair_Caste Enum_Diff_Caste  Noble SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0, cluster(EA_Name2) robust
	eststo Unfair_Caste_nc
reg Unfair_Caste Enum_Diff_Caste  Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1, cluster(EA_Name2) robust
	eststo Unfair_Caste_c
	
logit  LastName_Insult Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust or
	eststo LastName_Insult_nc
logit  LastName_Insult Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust or
	eststo LastName_Insult_c

logit  Denied_Any Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust or
	eststo Denied_Any_nc
logit  Denied_Any Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust or
	eststo Denied_Any_c

esttab  Unfair_Caste_c Unfair_Caste_nc  LastName_Insult_c LastName_Insult_nc  Denied_Any_c Denied_Any_nc using "Tables Output/Table2_OppCaste.tex", replace ///
	scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Enum_Diff_Caste Noble  Slave SES Religiosity SHO  Education Urban Female Age Peul _cons) ///
	order(Enum_Diff_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul  _cons) ///
	label title("Table 2 Replication with Enumerator of Opposite Caste"\label{T2_oppcaste})  compress  ///
	mtitles("Unfair Treatment" "Name Based Insult" "Denied Service/Right") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.14: Table 2 Replication with Enumerator of Same Caste
{
reg Unfair_Caste Enum_Same_Caste  Noble SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0, cluster(EA_Name2) robust
	eststo Unfair_Caste_nc
reg Unfair_Caste Enum_Same_Caste  Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1, cluster(EA_Name2) robust
	eststo Unfair_Caste_c
	
logit  LastName_Insult Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo LastName_Insult_nc
logit  LastName_Insult Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo LastName_Insult_c

logit  Denied_Any Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Denied_Any_nc
logit  Denied_Any Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Denied_Any_c

esttab  Unfair_Caste_c Unfair_Caste_nc  LastName_Insult_c LastName_Insult_nc  Denied_Any_c Denied_Any_nc using "Tables Output/Table2_SameCaste.tex", replace ///
	scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Enum_Same_Caste Noble  Slave SES Religiosity SHO  Education Urban Female Age Peul _cons) ///
	order(Enum_Same_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul  _cons) ///
	label title("Table 2 Replication with Enumerator of Same Caste"\label{T2_oppcaste})  compress  ///
	mtitles("Unfair Treatment" "Name Based Insult" "Denied Service/Right") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
* Table 8.15: Tables 3 & 4 Replication with Enumerator of Opposite Caste
{
logit  Respect_Differences2 Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Respect_Differences_nc
logit  Respect_Differences2 Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Respect_Differences_c

reg  Cross_Caste_Comfort Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_nc
reg  Cross_Caste_Comfort Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_c
	
reg  Accept_Index Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo Accept_Index_nc
reg  Accept_Index Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo Accept_Index_c

logit  Advice_BreakUp Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_nc
logit  Advice_BreakUp Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_c
	
reg  IntercasteMarriage_Index Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo IntercasteMarriage_nc
reg  IntercasteMarriage_Index Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo IntercasteMarriage_c
	
esttab Respect_Differences_c Respect_Differences_nc Cross_Caste_Comfort_c Cross_Caste_Comfort_nc Accept_Index_c Accept_Index_nc Advice_BreakUp_c Advice_BreakUp_nc IntercasteMarriage_c IntercasteMarriage_nc using "Tables Output/Table3_4_OppCaste.tex", replace ///
	scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Enum_Diff_Caste Noble  Slave SES Religiosity SHO  Education Urban Female Age Peul _cons) ///
	order(Enum_Diff_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul  _cons) ///
	label title("Tables 3 \& 4 Replication with Enumerator of Opposite Caste"\label{T2_oppcaste})  compress  ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index" "Advise Break-up" "Intercaste Marriage Index") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

* Table 8.16: Tables 3 & 4 Replication with Enumerator of Same Caste
{
logit  Respect_Differences2 Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Respect_Differences_nc
logit  Respect_Differences2 Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Respect_Differences_c

reg  Cross_Caste_Comfort Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_nc
reg  Cross_Caste_Comfort Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_c
	
reg  Accept_Index Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo Accept_Index_nc
reg  Accept_Index Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo Accept_Index_c

logit  Advice_BreakUp Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_nc
logit  Advice_BreakUp Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_c
	
reg  IntercasteMarriage_Index Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo IntercasteMarriage_nc
reg  IntercasteMarriage_Index Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo IntercasteMarriage_c
	
esttab Respect_Differences_c Respect_Differences_nc Cross_Caste_Comfort_c Cross_Caste_Comfort_nc Accept_Index_c Accept_Index_nc Advice_BreakUp_c Advice_BreakUp_nc IntercasteMarriage_c IntercasteMarriage_nc using "Tables Output/Table3_4_SameCaste.tex", replace ///
	scalars(r2 "FE EA Fixed Effects") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Enum_Same_Caste Noble  Slave SES Religiosity SHO  Education Urban Female Age Peul _cons) ///
	order(Enum_Same_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul  _cons) ///
	label title("Tables 3 \& 4 Replication with Enumerator of Same Caste"\label{T2_oppcaste})  compress  ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index" "Advise Break-up" "Intercaste Marriage Index") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
* Table 8.17: Do Younger Respondents Hold Less Discriminatory Attitudes?
{
logit  Respect_Differences2  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 1, cluster(EA_Name2) robust or
eststo Respect_Differences_youth
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 logit  Respect_Differences2  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 0, cluster(EA_Name2) robust or
eststo Respect_Differences_older
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Cross_Caste_Comfort  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 1, cluster(EA_Name2) robust
eststo Cross_Caste_Comfort_youth
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 reg  Cross_Caste_Comfort  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 0, cluster(EA_Name2) robust
eststo Cross_Caste_Comfort_older
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Accept_Index SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 1, cluster(EA_Name2) robust
eststo Accept_Index_youth
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 reg  Accept_Index SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 0, cluster(EA_Name2) robust
eststo Accept_Index_older
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

logit  Advice_BreakUp SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 1, cluster(EA_Name2) robust or
eststo Advice_BreakUp_youth
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 logit  Advice_BreakUp SHO Noble Casted_Only Slave  SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 0, cluster(EA_Name2) robust or
eststo Advice_BreakUp_older
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 1, cluster(EA_Name2) robust
eststo IntercasteMarriage_youth
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Youth == 0, cluster(EA_Name2) robust
eststo IntercasteMarriage_older
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
  
esttab Respect_Differences_youth Respect_Differences_older Cross_Caste_Comfort_youth Cross_Caste_Comfort_older Accept_Index_youth Accept_Index_older Advice_BreakUp_youth Advice_BreakUp_older IntercasteMarriage_youth IntercasteMarriage_older   using "Tables Output/Table5_6_Youth_v_Older.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave Enqueteur_Casted _cons) ///
	label title("Do Younger Respondents Hold Less Discriminatory Attitudes?"\label{Generational})  compress eform (1 1 0 0 0 0 1 1 0 0 ) ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index" "Advise Child No Marriage" "Network Intermarriage Index") addnote(Models 1-2 reports Odds Ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 8.18: Does SES Influence Respondent answers?
{
sum SES, d

gen upperclass = 0
replace upperclass = 1 if SES > 0.52


reg Unfair_Caste  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0, cluster(EA_Name2) robust
	est store Unfair0
reg Unfair_Caste  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1, cluster(EA_Name2) robust
	est store Unfair1

logit LastName_Insult  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0 , cluster(EA_Name2) robust
	est store Insult0
logit LastName_Insult  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1 , cluster(EA_Name2) robust
	est store Insult1

logit Denied_Any  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0 , cluster(EA_Name2) robust
	est store Denied0
logit Denied_Any  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1 , cluster(EA_Name2) robust
	est store Denied1

esttab Unfair0 Unfair1 Insult0 Insult1 Denied0 Denied1     using "Tables Output/SES_Experiences.tex", replace ///
	scalars(r2) modelwidth(2) b(3) keep(Noble Casted_Only Slave) ///
	star(* 0.10 ** 0.05 *** 0.01) label title("Do Richer Respondents Have Different Experiences?"\label{SES_1}) nonumbers compress  ///
	mtitles("Unfair Caste" "Last Name Insult"  "Denied Any" )

	
logit  Respect_Differences2 Noble Casted_Only Slave Caste_Grp2 SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0 , cluster(EA_Name2) robust or
	est store Respect0
logit  Respect_Differences2 Noble Casted_Only Slave Caste_Grp2 SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1 , cluster(EA_Name2) robust or
	est store Respect1
	
reg Cross_Caste_Comfort  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0 , cluster(EA_Name2) robust
	est store Comfort0
reg Cross_Caste_Comfort  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1 , cluster(EA_Name2) robust
	est store Comfort1

reg Accept_Index  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0 , cluster(EA_Name2) robust
	est store Accept0
reg Accept_Index  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1 , cluster(EA_Name2) robust
	est store Accept1

logit  Advice_BreakUp Noble Casted_Only Slave Caste_Grp2 SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0 , cluster(EA_Name2) robust or
	est store Breakup0
logit  Advice_BreakUp Noble Casted_Only Slave Caste_Grp2 SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1 , cluster(EA_Name2) robust or
	est store Breakup1

reg IntercasteMarriage_Index  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 0 , cluster(EA_Name2) robust
	est store Marriage0
reg IntercasteMarriage_Index  Noble Casted_Only Slave SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  if upperclass == 1 , cluster(EA_Name2) robust
	est store Marriage1

esttab Respect0 Respect1 Comfort0 Comfort1 Accept0 Accept1 Breakup0 Breakup1 Marriage0 Marriage1   using "Tables Output/SES_Norms.tex", replace ///
	scalars(r2) modelwidth(2) b(3) keep(Noble Casted_Only Slave) ///
	star(* 0.10 ** 0.05 *** 0.01) label title("Do Richer Respondents Hold Different Attitudes?"\label{SES_1}) nonumbers compress  ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index" "Advise Child No Marriage" "Network Intermarriage Index")
}
}

************************************************************************************************
* 9. POLICY PREFERENCES TOWARD CASTE DISCRIMINATION
************************************************************************************************
{
*Table 9.1: Policy Preferences Regarding Discrimination (Table 5 Full Results)
{
reg Gov_Help_Jobs Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Jobs
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Jobs SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Jobs2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

reg Gov_Help_Housing Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Housing
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Housing SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Housing2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

reg Gov_Help_Burial Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Burial
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Burial SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Burial2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

reg Gov_Help_Mosque Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Mosque
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Mosque SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Mosque2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

	
esttab Gov_Help_Jobs Gov_Help_Jobs2 Gov_Help_Housing Gov_Help_Housing2 Gov_Help_Burial Gov_Help_Burial2 Gov_Help_Mosque Gov_Help_Mosque2 using "Tables Output/PolicyPrefs_Full.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul Enqueteur_Casted _cons) ///
	label title("Policy Preferences Regarding Discrimination"\label{PolicyPrefs_Full}) compress  ///
	mtitles("Jobs" "Housing" "Burial" "Mosque") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 9.2: Policy Preferences Regarding Discrimination - Casted versus Non-Casted Respondents
{
reg  Gov_Help_Jobs SHO Noble SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Jobs SHO Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Housing SHO Noble SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Housing_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Housing SHO Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Housing_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Burial SHO Noble SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Burial SHO Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Mosque SHO Noble SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Mosque SHO Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted   if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

esttab Gov_Help_Jobs_NC Gov_Help_Jobs_C Gov_Help_Housing_NC Gov_Help_Housing_C Gov_Help_Burial_NC Gov_Help_Burial_C Gov_Help_Mosque_NC Gov_Help_Mosque_C using "Tables Output/PolicyPrefs_C_NC.tex", replace ///
		scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble  Slave Enqueteur_Casted  _cons) ///
		order(Noble  Slave  Enqueteur_Casted _cons) ///
		label title("Policy Preferences Regarding Discrimination"\label{PolicyPrefs_C_NC}) compress  ///
		mtitles("Jobs" "Housing" "Burial" "Mosque") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
	
*Table 9.3: Policy Preferences: Belief Government Would Act Regarding Discrimination
{
	reg  Gov_Act_Jobs  Noble Casted_Only Slave  , cluster(EA_Name2) robust
	eststo Gov_Act_Job
	 estadd local  FE  "Yes"
	 estadd local  DC  "No"
	reg  Gov_Act_Jobs SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Gov_Act_Job2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

	reg  Gov_Act_Housing  Noble Casted_Only Slave   , cluster(EA_Name2) robust
	eststo Gov_Act_Housing
	 estadd local  FE  "Yes"
	 estadd local  DC  "No"
	reg  Gov_Act_Housing SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Gov_Act_Housing2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

	reg  Gov_Act_Burial  Noble Casted_Only Slave  , cluster(EA_Name2) robust
	eststo Gov_Act_Burial
	 estadd local  FE  "Yes"
	 estadd local  DC  "No"
	reg  Gov_Act_Burial SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Gov_Act_Burial2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

	reg  Gov_Act_Mosque  Noble Casted_Only Slave  , cluster(EA_Name2) robust
	eststo Gov_Act_Mosque
	 estadd local  FE  "Yes"
	 estadd local  DC  "No"
	reg  Gov_Act_Mosque SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	eststo Gov_Act_Mosque2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
		
	esttab Gov_Act_Job Gov_Act_Job2 Gov_Act_Housing Gov_Act_Housing2 Gov_Act_Burial Gov_Act_Burial2 Gov_Act_Mosque Gov_Act_Mosque2  using "Tables Output/PolicyPrefs_Would.tex", replace ///
		scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave Enqueteur_Casted _cons) ///
		order(Noble Casted_Only Slave Enqueteur_Casted _cons) ///
		label title("Belief Government Would Act Regarding Discrimination"\label{PolicyPrefs_Would}) compress  ///
		mtitles("Would help: Jobs" "Would help: Housing" "Would help: Burial" "Would help: Mosque") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 9.4: Policy Preferences Regarding Discrimination: Enumerator of Opposite Caste
{
reg  Gov_Help_Jobs Enum_Diff_Caste SHO Noble SES Religiosity Education Urban Female Age Peul    if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Jobs Enum_Diff_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Housing Enum_Diff_Caste SHO Noble SES Religiosity Education Urban Female Age Peul     if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Housing_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Housing Enum_Diff_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Housing_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Burial Enum_Diff_Caste SHO Noble SES Religiosity Education Urban Female Age Peul     if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Burial Enum_Diff_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Mosque Enum_Diff_Caste SHO Noble SES Religiosity Education Urban Female Age Peul     if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Mosque Enum_Diff_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

esttab  Gov_Help_Jobs_C Gov_Help_Jobs_NC  Gov_Help_Housing_C Gov_Help_Housing_NC   Gov_Help_Burial_C Gov_Help_Burial_NC  Gov_Help_Mosque_C Gov_Help_Mosque_NC using "Tables Output/PolicyPrefs_Opp_Diff_Caste.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Enum_Diff_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul  _cons) ///
	order(Enum_Diff_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul  _cons) ///
		label title("Policy Preferences Regarding Discrimination"\label{PolicyPrefs_C_NC}) compress  ///
		mtitles("Jobs" "Housing" "Burial" "Mosque") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}

*Table 9.5: Policy Preferences Regarding Discrimination: Enumerator of Same Caste
{
reg  Gov_Help_Jobs Enum_Same_Caste SHO Noble SES Religiosity Education Urban Female Age Peul    if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Jobs Enum_Same_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Housing Enum_Same_Caste SHO Noble SES Religiosity Education Urban Female Age Peul     if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Housing_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Housing Enum_Same_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Housing_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Burial Enum_Same_Caste SHO Noble SES Religiosity Education Urban Female Age Peul     if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Burial Enum_Same_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

reg  Gov_Help_Mosque Enum_Same_Caste SHO Noble SES Religiosity Education Urban Female Age Peul     if Casted == 0, cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_NC
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Mosque Enum_Same_Caste SHO Slave SES Religiosity Education Urban Female Age Peul     if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_C
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

esttab  Gov_Help_Jobs_C Gov_Help_Jobs_NC  Gov_Help_Housing_C Gov_Help_Housing_NC   Gov_Help_Burial_C Gov_Help_Burial_NC  Gov_Help_Mosque_C Gov_Help_Mosque_NC using "Tables Output/PolicyPrefs_Same_Diff_Caste.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Enum_Same_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul  _cons) ///
	order(Enum_Same_Caste Noble  Slave SHO SES Religiosity Education Urban Female Age Peul _cons) ///
		label title("Policy Preferences Regarding Discrimination"\label{PolicyPrefs_C_NC}) compress  ///
		mtitles("Jobs" "Housing" "Burial" "Mosque") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
}
}

************************************************************************************************
* 10. MODEL REPLICATIONS WITH ENUMERATOR FIXED EFFECTS 
************************************************************************************************	
{
* Table 10.1: Model Replications with Enumerator Fixed Effects
reg Unfair_Caste  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enum_Same_Caste i.EnumeratorID , cluster(EA_Name2) robust
eststo Unfair_Caste2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  LastName_Insult  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enum_Same_Caste i.EnumeratorID , cluster(EA_Name2) robust or
eststo LastName_Insult2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  Denied_Any Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enum_Same_Caste i.EnumeratorID , cluster(EA_Name2) robust or
eststo Denied_Any2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 
logit  Respect_Differences2  Noble Casted_Only Slave Seperate_Bio SHO SES Religiosity Education Urban Female Age Peul  Enum_Same_Caste i.EnumeratorID  , cluster(EA_Name2) robust or
eststo Respect_Differences
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

reg  Cross_Caste_Comfort  Noble Casted_Only Slave Seperate_Bio SHO SES Religiosity Education Urban Female Age Peul  Enum_Same_Caste i.EnumeratorID
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Accept_Index SHO Noble Casted_Only Slave Seperate_Bio SES Religiosity Education Urban Female Age Peul  Enum_Same_Caste i.EnumeratorID  , cluster(EA_Name2) robust
eststo Accept_Index
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

esttab  Unfair_Caste2  LastName_Insult2  Denied_Any2 Respect_Differences Cross_Caste_Comfort Accept_Index   using "Tables Output/Discrimination_EnumFE.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  modelwidth(2) keep(Noble Casted_Only Slave Enum_Same_Caste _cons) ///
	order(Noble Casted_Only Slave Enum_Same_Caste _cons) ///
	label title("Tables 2 and 4 Replication with Enumerator Fixed Effects"\label{EnumFE1}) compress eform(0 1 1 1 0 0 1 0) ///
	mtitles("Unfair Treatment" "Name-based Insult" "Denied Service/Right" "Respect Differences" "Cross-Caste Comfort" "Acceptance Index") 
	
logit  Advice_BreakUp Enum_Same_Caste SHO Noble Casted_Only Slave Seperate_Bio SES Religiosity Education Urban Female Age Peul   i.EnumeratorID  , cluster(EA_Name2) robust or
	eststo Advice_BreakUp
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index  Enum_Same_Caste Noble Casted_Only Slave Seperate_Bio SHO SES Religiosity Education Urban Female Age Peul   i.EnumeratorID  , cluster(EA_Name2) robust
	eststo IntercasteMarriage
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
	
reg  Gov_Help_Jobs SHO Enum_Same_Caste Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul   i.EnumeratorID   , cluster(EA_Name2) robust
	eststo Gov_Help_Jobs2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Housing Enum_Same_Caste SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul   i.EnumeratorID   , cluster(EA_Name2) robust
	eststo Gov_Help_Housing2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Burial Enum_Same_Caste SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul   i.EnumeratorID   , cluster(EA_Name2) robust
	eststo Gov_Help_Burial2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"
reg  Gov_Help_Mosque Enum_Same_Caste  SHO Noble Casted_Only Slave SES Religiosity Education Urban Female Age Peul   i.EnumeratorID   , cluster(EA_Name2) robust
	eststo Gov_Help_Mosque2
	 estadd local  FE  "Yes"
	 estadd local  DC  "Yes"

esttab  Advice_BreakUp  IntercasteMarriage  Gov_Help_Jobs2  Gov_Help_Housing2  Gov_Help_Burial2  Gov_Help_Mosque2 using "Tables Output/PolicyPrefs_EnumFE.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave Enum_Same_Caste _cons) ///
	order(Noble Casted_Only Slave Enum_Same_Caste _cons) ///
	label title("Tables 5-7 Replication with Enumerator Fixed Effects"\label{EnumFE2}) compress eform(1 0 0 0 0 0) ///
	mtitles("Advise Child No Marriage" "Network Intermarriage Index"  "Jobs" "Housing" "Burial" "Mosque") 
}

************************************************************************************************
* 11. WHO RESPONDS TO ENUMERATOR CASTE?
************************************************************************************************
{
ssc install interflex, replace all

label define enum 0 "NonCasted" 1 "Casted"
label values Enqueteur_Casted enum
		
* SHO	
	interflex Unfair_Caste Enqueteur_Casted SHO SES Religiosity Education Urban Female Age Peul , type(kernel) vce(robust) ylab("") xlab("") title(Unfair Caste)
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted SHO SES Religiosity Education Urban Female Age Peul , type(kernel) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort)
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted SHO SES Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace
	interflex Gov_Help_Housing Enqueteur_Casted SHO SES Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Housing)
	graph save Figures/Fig5.gph, replace
	interflex Gov_Help_Burial Enqueteur_Casted SHO SES Religiosity Education Urban Female Age Peul , type(kernel) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace
	interflex Gov_Help_Mosque Enqueteur_Casted SHO SES Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		title(Marginal Effect of Casted Enumerator x Social Hierarchy Orientation) col(2)

* SES			
	interflex Unfair_Caste Enqueteur_Casted  SES SHO Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Unfair Caste) 
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted  SES SHO Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort) 
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted  SES SHO Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace
	interflex Gov_Help_Housing Enqueteur_Casted  SES SHO Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Housing) 
	graph save Figures/Fig5.gph, replace
	interflex Gov_Help_Burial Enqueteur_Casted  SES SHO Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace
	interflex Gov_Help_Mosque Enqueteur_Casted  SES SHO Religiosity Education Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph  Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		title(Marginal Effect of Casted Enumerator x SES) col(2)


* EDUCATION			
	interflex Unfair_Caste Enqueteur_Casted Education SES SHO Religiosity  Urban Female Age Peul , type(kernel) vce(robust) ylab("") xlab("") title(Unfair Caste) 
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted Education SES SHO Religiosity  Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort) 
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted Education SES SHO Religiosity  Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace
	interflex Gov_Help_Housing Enqueteur_Casted Education SES SHO Religiosity  Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Housing) 
	graph save Figures/Fig5.gph, replace
	interflex Gov_Help_Burial Enqueteur_Casted Education SES SHO Religiosity  Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace
	interflex Gov_Help_Mosque Enqueteur_Casted Education SES SHO Religiosity  Urban Female Age Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		 col(2)


* AGE			
	interflex Unfair_Caste Enqueteur_Casted Age Education SES SHO Religiosity  Urban Female  Peul , type(kernel) vce(robust) ylab("") xlab("") title(Unfair Caste) saving(Figures/fig1, replace)
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted Age Education SES SHO Religiosity  Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort) saving(Figures/fig1, replace)
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted Age Education SES SHO Religiosity  Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace
	interflex Gov_Help_Housing Enqueteur_Casted Age Education SES SHO Religiosity  Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Housing) 
	graph save Figures/Fig5.gph, replace
	interflex Gov_Help_Burial Enqueteur_Casted Age Education SES SHO Religiosity  Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace
	interflex Gov_Help_Mosque Enqueteur_Casted Age Education SES SHO Religiosity  Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		col(2)

	
* RELIGIOSITY			
	interflex Unfair_Caste Enqueteur_Casted Religiosity Age Education SES SHO   Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Unfair Caste) 
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted Religiosity Age Education SES SHO Religiosity  Urban Female  Peul , type(kernel) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort) 
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted Religiosity Age Education SES SHO   Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace
	interflex Gov_Help_Housing Enqueteur_Casted Religiosity Age Education SES SHO   Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Housing) 
	graph save Figures/Fig5.gph, replace
	interflex Gov_Help_Burial Enqueteur_Casted Religiosity Age Education SES SHO   Urban Female  Peul , type(kernel) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace
	interflex Gov_Help_Mosque Enqueteur_Casted Religiosity Age Education SES SHO   Urban Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		col(2)
		
	
* URBAN			
	interflex Unfair_Caste Enqueteur_Casted Urban Religiosity Age Education SES SHO    Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Unfair Caste) 
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted Urban Religiosity Age Education SES SHO Religiosity   Female  Peul , type(kernel) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort) 
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted Urban Religiosity Age Education SES SHO    Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace

	interflex Gov_Help_Housing Enqueteur_Casted Urban Religiosity Age Education SES SHO    Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Housing) 
	graph save Figures/Fig5.gph, replace

	interflex Gov_Help_Burial Enqueteur_Casted Urban Religiosity Age Education SES SHO    Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace

	interflex Gov_Help_Mosque Enqueteur_Casted Urban Religiosity Age Education SES SHO    Female  Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		col(2)
		
	
	
* FEMALE			
	interflex Unfair_Caste Enqueteur_Casted Female Urban Religiosity Age Education SES SHO      Peul , type(linear) vce(robust) ylab("") xlab("") title(Unfair Caste) 
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted Female Urban Religiosity Age Education SES SHO Religiosity     Peul , type(linear) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort) 
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted Female Urban Religiosity Age Education SES SHO      Peul , type(kernel) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace
	interflex Gov_Help_Housing Enqueteur_Casted Female Urban Religiosity Age Education SES SHO      Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Housing) 
	graph save Figures/Fig5.gph, replace
	interflex Gov_Help_Burial Enqueteur_Casted Female Urban Religiosity Age Education SES SHO      Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace
	interflex Gov_Help_Mosque Enqueteur_Casted Female Urban Religiosity Age Education SES SHO      Peul , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		col(2)
		
	

* Peul			
	interflex Unfair_Caste Enqueteur_Casted Peul Female Urban Religiosity Age Education SES SHO       , type(linear) vce(robust) ylab("") xlab("") title(Unfair Caste) 
	graph save Figures/Fig1.gph, replace
	interflex Cross_Caste_Comfort Enqueteur_Casted Peul Female Urban Religiosity Age Education SES SHO Religiosity  , type(kernel) vce(robust) ylab("") xlab("") title(Cross-Caste Comfort) 
	graph save Figures/Fig2.gph, replace
	 
	interflex Gov_Help_Jobs Enqueteur_Casted Peul Female Urban Religiosity Age Education SES SHO  , type(linear) vce(robust) ylab("") xlab("") title(Help Jobs) 
	graph save Figures/Fig4.gph, replace
	interflex Gov_Help_Housing Enqueteur_Casted Peul Female Urban Religiosity Age Education SES SHO , type(linear) vce(robust) ylab("") xlab("") title(Help Housing) 
	graph save Figures/Fig5.gph, replace
	interflex Gov_Help_Burial Enqueteur_Casted Peul Female Urban Religiosity Age Education SES SHO  , type(linear) vce(robust) ylab("") xlab("") title(Help Burial) 
	graph save Figures/Fig6.gph, replace
	interflex Gov_Help_Mosque Enqueteur_Casted Peul Female Urban Religiosity Age Education SES SHO , type(linear) vce(robust) ylab("") xlab("") title(Help Mosque) 
	graph save Figures/Fig7.gph, replace

	graph combine Figures/Fig1.gph Figures/Fig2.gph Figures/Fig4.gph Figures/Fig5.gph Figures/Fig6.gph Figures/Fig7.gph, ///
		col(2)
}
	
************************************************************************************************
* 12. INTERACTION TERMS: GENDER, PEUL AND RELIGIOSITY 
************************************************************************************************
{
*GENDER
{
	*Discrimination
	reg Unfair_Caste  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Unfair Treatment") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/UnfairCaste_Gender.gph, replace
		
	logit LastName_Insult  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Name-based Insult (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/LastName_Insult_Gender.gph, replace

	logit Denied_Any  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Denied Service/Right (logit)") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Denied_Any_Gender.gph, replace

	graph combine Figures/UnfairCaste_Gender.gph  Figures/LastName_Insult_Gender.gph Figures/Denied_Any_Gender.gph, ///
		row(1) title("Caste Identity Affects the Likelihood of Discrimination", size(medlarge)) 
		graph save Figures/Discrimination_Gender.gph, replace

		
	*Why Norms Persist
	logit  Respect_Differences2 ib2.Caste_Grp2##i.Female Caste_Grp2 SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Should Respect Caste Norms (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/respect_Gender.gph, replace

	reg Cross_Caste_Comfort  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Cross Caste Comfort Index") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/CC_Comfort_Gender.gph, replace

	reg Accept_Index  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Acceptance Index") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Acceptance_Gender.gph, replace

	graph combine Figures/respect_Gender.gph Figures/CC_Comfort_Gender.gph Figures/Acceptance_Gender.gph, ///
		row(1) title("Higher Status Groups Less Comfortable with Cross-Caste Relations", size(medlarge)) 
		graph save Figures/CrossCaste_Gender.gph, replace


	 
	logit  Advice_BreakUp ib2.Caste_Grp2##i.Female Caste_Grp2 SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Advise Child No Marriage (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/advise_Gender.gph, replace

	reg IntercasteMarriage_Index  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Network Intermarriage Index") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Marriage_Gender.gph, replace

			
	graph combine Figures/advise_Gender.gph Figures/Marriage_Gender.gph, ///
		row(1) title("Higher Status Groups Enforce Marriage Restrictions/Social Hierarchy", size(medlarge)) 
		graph save Figures/Status2_Gender.gph, replace


	graph combine Figures/CrossCaste_Gender.gph Figures/Status2_Gender.gph,  ///
		col(1) title("")
		graph save Figures/HigherStatus_Culture_Gender.gph , replace
		graph save Figures/HigherStatus_Culture_Gender.jpg , replace


	**POLICY PREFERENCES
	reg Gov_Help_Jobs  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Jobs") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Gov_Help_Jobs_Gender.gph, replace

	reg Gov_Help_Housing  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Housing") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Help_Housing_Gender.gph, replace

	reg Gov_Help_Burial  ib2.Caste_Grp2##i.Female SHO SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Burial") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Help_Burial_Gender.gph, replace

	reg  Gov_Act_Mosque ib2.Caste_Grp2##i.Female Caste_Grp2 SES Religiosity Education Urban  Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust 
	margins Caste_Grp2, dydx(Female)
	marginsplot, title("Mosque") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Act_Mosque_Gender.gph, replace

	graph combine Figures/Gov_Help_Jobs_Gender.gph Figures/Gov_Help_Housing_Gender.gph Figures/Gov_Help_Burial_Gender.gph Figures/Gov_Act_Mosque_Gender.gph, ///
		row(2) title("Policy Preferences Regarding Discrimination", size(medlarge)) 
		graph save Figures/PolicyPrefs_Gender.gph, replace
		graph save Figures/PolicyPrefs_Gender.jpg, replace
}

*PEUL
{
	*Discrimination
	reg Unfair_Caste  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Unfair Treatment") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/UnfairCaste_Peul.gph , replace
		
	logit LastName_Insult  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Name-based Insult (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/LastName_Insult_Peul.gph , replace

	logit Denied_Any  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Denied Service/Right (logit)") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Denied_Any_Peul.gph , replace

	graph combine Figures/UnfairCaste_Peul.gph   Figures/LastName_Insult_Peul.gph  Figures/Denied_Any_Peul.gph , ///
		row(1) title("Caste Identity Affects the Likelihood of Discrimination", size(medlarge)) 
		graph save Figures/Discrimination_Peul.gph , replace
		

		
	*Why Norms Persist
	logit  Respect_Differences2 ib2.Caste_Grp2##i.Peul Caste_Grp2 SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust or
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Should Respect Caste Norms (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/respect_Peul.gph , replace

	reg Cross_Caste_Comfort  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Cross Caste Comfort Index") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/CC_Comfort_Peul.gph , replace

	reg Accept_Index  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Acceptance Index") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Acceptance_Peul.gph , replace

	graph combine Figures/respect_Peul.gph  Figures/CC_Comfort_Peul.gph  Figures/Acceptance_Peul.gph , ///
		row(1) title("Higher Status Groups Less Comfortable with Cross-Caste Relations", size(medlarge)) 
		graph save Figures/CrossCaste_Peul.gph , replace


	 
	logit  Advice_BreakUp ib2.Caste_Grp2##i.Peul Caste_Grp2 SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust or
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Advise Child No Marriage (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/advise_Peul.gph , replace

	reg IntercasteMarriage_Index  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Network Intermarriage Index") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Marriage_Peul.gph , replace

			
	graph combine Figures/advise_Peul.gph  Figures/Marriage_Peul.gph  , ///
		row(1) title("Higher Status Groups Enforce Marriage Restrictions/Social Hierarchy", size(medlarge)) 
		graph save Figures/Status2_Peul.gph , replace


	graph combine Figures/CrossCaste_Peul.gph  Figures/Status2_Peul.gph ,  ///
		col(1) title("")
		graph save Figures/HigherStatus_Culture_Peul.gph  , replace
		graph save Figures/HigherStatus_Culture_Peul.jpg , replace


	**TABLE 7: POLICY PREFERENCES
	reg Gov_Help_Jobs  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Jobs") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Gov_Help_Jobs_Peul.gph , replace

	reg Gov_Help_Housing  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Housing") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Help_Housing_Peul.gph , replace

	reg Gov_Help_Burial  ib2.Caste_Grp2##i.Peul SHO SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Burial") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Help_Burial_Peul.gph , replace

	reg  Gov_Act_Mosque ib2.Caste_Grp2##i.Peul Caste_Grp2 SES Religiosity Education Urban  Age Female   Enqueteur_Casted  , cluster(EA_Name2) robust 
	margins Caste_Grp2, dydx(Peul)
	marginsplot, title("Mosque") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Act_Mosque_Peul.gph , replace

	graph combine Figures/Gov_Help_Jobs_Peul.gph  Figures/Gov_Help_Housing_Peul.gph  Figures/Gov_Help_Burial_Peul.gph  Figures/Gov_Act_Mosque_Peul.gph , ///
		row(2) title("Policy Preferences Regarding Discrimination", size(medlarge)) 
		graph save Figures/PolicyPrefs_Peul.gph , replace
		graph save Figures/PolicyPrefs_Peul.jpg, replace
}	
			
*RELIGIOSITY
{
	*Discrimination
	reg Unfair_Caste  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Unfair Treatment") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/UnfairCaste__Relig.gph , replace
		
	logit LastName_Insult  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Name-based Insult (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/LastName_Insult__Relig.gph , replace

	logit Denied_Any  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Denied Service/Right (logit)") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Denied_Any__Relig.gph , replace

	graph combine Figures/UnfairCaste__Relig.gph   Figures/LastName_Insult__Relig.gph  Figures/Denied_Any__Relig.gph , ///
		row(1) title("Caste Identity Affects the Likelihood of Discrimination", size(medlarge)) 
		graph save Figures/Discrimination__Relig.gph , replace

		
	*Why Norms Persist
	logit  Respect_Differences2 ib2.Caste_Grp2##c.Religiosity Caste_Grp2 SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust or
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Should Respect Caste Norms (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/respect__Relig.gph , replace

	reg Cross_Caste_Comfort  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Cross Caste Comfort Index") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/CC_Comfort__Relig.gph , replace

	reg Accept_Index  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Acceptance Index") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Acceptance__Relig.gph , replace

	graph combine Figures/respect__Relig.gph  Figures/CC_Comfort__Relig.gph  Figures/Acceptance__Relig.gph , ///
		row(1) title("Higher Status Groups Less Comfortable with Cross-Caste Relations", size(medlarge)) 
		graph save Figures/CrossCaste__Relig.gph , replace

	 
	logit  Advice_BreakUp ib2.Caste_Grp2##c.Religiosity Caste_Grp2 SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust or
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Advise Child No Marriage (logit)") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/advise__Relig.gph , replace

	reg IntercasteMarriage_Index  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Network Intermarriage Index") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Marriage__Relig.gph , replace

			
	graph combine Figures/advise__Relig.gph  Figures/Marriage__Relig.gph  , ///
		row(1) title("Higher Status Groups Enforce Marriage Restrictions/Social Hierarchy", size(medlarge)) 
		graph save Figures/Status2__Relig.gph , replace


	graph combine Figures/CrossCaste__Relig.gph  Figures/Status2__Relig.gph ,  ///
		col(1) title("")
		graph save Figures/HigherStatus_Culture__Relig.gph  , replace
		graph save Figures/HigherStatus_Culture_Relig.jpg , replace


	**TABLE 7: POLICY PREFERENCES
	reg Gov_Help_Jobs  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Jobs") ytitle("") xtitle("") legend(off) scheme(s1color)
	graph save Figures/Gov_Help_Jobs__Relig.gph , replace

	reg Gov_Help_Housing  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Housing") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Help_Housing__Relig.gph , replace

	reg Gov_Help_Burial  ib2.Caste_Grp2##c.Religiosity SHO SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Burial") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Help_Burial__Relig.gph , replace

	reg  Gov_Act_Mosque ib2.Caste_Grp2##c.Religiosity Caste_Grp2 SES  Education Urban  Age Female Peul   Enqueteur_Casted  , cluster(EA_Name2) robust 
	margins Caste_Grp2, dydx(Religiosity)
	marginsplot, title("Mosque") ytitle("") xtitle("") legend(off)  scheme(s1color)
	graph save Figures/Gov_Act_Mosque__Relig.gph , replace

	graph combine Figures/Gov_Help_Jobs__Relig.gph  Figures/Gov_Help_Housing__Relig.gph  Figures/Gov_Help_Burial__Relig.gph  Figures/Gov_Act_Mosque__Relig.gph , ///
		row(2) title("Policy Preferences Regarding Discrimination", size(medlarge)) 
		graph save Figures/PolicyPrefs__Relig.gph , replace
		graph save Figures/PolicyPrefs_Relig.jpg, replace
}

}

